﻿@{
    Inpinke.Model.Inpinke_Book model = ViewBag.EditBook as Inpinke.Model.Inpinke_Book;

    ViewBag.Title = model.BookName;
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@section  LinkScript{
    <link href="../../Content/pagestyle/css/editor_v2.0.css" rel="Stylesheet" type="text/css" />
    <script type="text/javascript" src="../../Content/pagestyle/js/jquery-ui-1.8.21.custom.min.js"></script>
   <script type="text/javascript" src="../../Content/pagestyle/js/plupload/plupload.flash.html4.js"></script>
   <script type="text/javascript" src="../../Content/pagestyle/js/intime.pagestyle.js"></script>
    <script type="text/javascript" src="../../Content/pagestyle/js/editor.base.js"></script>
    <script type="text/javascript">
        $(function () {
        _editorData.bookID=@(model.ID);
        _editorData.userID=@(model.UserID);
        _editorData.totalCount=@(model.PageCount);
        _editorData.scale = 3.44;  /*像素缩放比，480px=14cm=按300dpi算需要1653px 这个值为1653/480*/
            __ImageViewObj.getInstance();
            __ImageUploaderObj.getInstance();
            __PageViewObj.getInstance();
            __PageStylePanelObj.getInstance({itemWidth: 40,
            itemHeight: 40,
            itemCount: 8,
            skipItemCount: 6});
            __BookPageObj.getInstance();
            __PageSetPanelObj.getInstance();
            __MPageViewObj.getInstance();
            __BookSetObj.getInstance();
            __BgColorPanelObj.getInstance();
          
        })
    </script>
}
<div class="content_wrapper editor_wrapper  @(model.Inpinke_Product.ProductCode) ">    
 <div class="notice_tip boxshadow6" id="__noticeTip">
     <div class="notice_tip_content">自动保存成功!</div>
    </div>
    <div class="imgview_panel_wrapper boxshadow">
        <ul class="imgview_menu clearfix">
            <li class="first_item"><a href="javascript:;" id="usedImageBtn" class="image_view_switch"
                type="1">已使用</a><span class="arrow_icon"></span></li>
            <li class="active"><a href="javascript:;" id="allImageBtn" class="image_view_switch"
                type="2">全部</a><span class="arrow_icon"></span></li><li><a href="javascript:;" id="newImageBtn"
                    class="image_view_switch" type="3">未使用</a><span class="arrow_icon"></span></li><li><a
                        href="javascript:;" id="otherImageBtn" class="image_view_switch" type="4">其他</a><span
                            class="arrow_icon"></span></li>
                              <li style="float: right;"><a href="javascript:;" class="expend_imgview" id="expendImgViewBtn"
                title="↓展开/收起↑">展开↓</a></li>
            <li style="float: right;"><a href="javascript:;" class="e_bg slide_r bind_slide"
                title="下一页"></a></li>
            <li style="float: right;"><a href="javascript:;" class="e_bg slide_l bind_slide"
                title="上一页"></a></li>
        </ul>
        <div class="imgview_panel clearfix" id="imgViewPanel">
            <div id="addImageBtn" class="add_img">
                <div class="e_bg upload_icon">
                </div>
                <div class="upload_num">
                    0</div>
            </div>
            <div class="image_view">
                <ul class="clearfix" id="imageViewList">
                </ul>
                <div class="first_step_tip" style="display: none;" id="zeroImageTip">
                    <img src="../../Content/pagestyle/editor_img/tip_arrow.gif" alt="" style="position: relative;
                        top: 25px;" />
                    <div class="tip_content" style="background-color: #5c9ad5; position: absolute; left: 35px;
                        top: 0px; width: 160px; height: 80px; color: #fff; line-height: 1.8em; padding: 5px;
                        padding-left: 10px;">
                        请先上传照片<br />
                        您总共可上传<span style="color: #ffd633; font-size: 16px;">300张</span>照片<br />
                        单张照片大小请勿超过<span style="color: #ffd633; font-size: 16px;">10M</span>
                    </div>
                </div>
            </div>
        </div>
    </div>
   
    <div class="book_panel clearfix">
        <div id="bookPageWrapper" class="book_page_wrapper boxshadow">
        </div>
        <a class="e_bg page_switcher prev_switcher" href="javascript:;" title="上一页"></a>
        <div class="book_mid">
        </div>
        <a class="e_bg page_switcher next_switcher" href="javascript:;" title="下一页"></a>
        <div class="editor_tool boxshadow">
            <span class="arrow_icon"></span>
            <ul class="clearfix">
                <li class="page_num"><span id="panNumTxt">封面</span>
                    <div class="pagestyle_panel clearfix" style="display: none;">
                        <a class="panel_close" href="javascript:;" id="pageStylePanelClose">X</a>
                    </div>
                </li>
                <li class="page_style"><a href="javascript:;" id="pageStyleBtn">版式</a><span class="active_arrow_icon"></span>
                </li>
                <li class="bg_color"><a href="javascript:;" id="bgColorBtn">背景色</a><span class="active_arrow_icon"></span></li>
            </ul>
        </div>
        <div class="layer_panel style_layer_panel" id="pageStylePanel">
            <div class="layer_panel_content clearfix">
            </div>
        </div>
        <div class="layer_panel pagebgcolor_panel clearfix" id="bgColorPanel">
          <div class="layer_panel_content clearfix">
            </div>
        </div>

        <div id="uploadPanel" class="upload_panel box_panel" style="visibility: hidden">
            <div class="panel_title" style="">
                上传照片<a href="javascript:;" title="关闭" class="panel_close">X</a>
            </div>
            <table class="queue_list_title">
                <colgroup>
                    <col width="50%" />
                    <col width="100" />
                    <col width="270" />
                    <col width="200" />
                </colgroup>
                <tbody>
                    <tr>
                        <th>
                            文件名
                        </th>
                        <th>
                            大小
                        </th>
                        <th>
                            进度
                        </th>
                        <th>
                            操作
                        </th>
                    </tr>
                </tbody>
            </table>
            <div class="queue_list_wrapper">
                <table class="queue_list">
                    <colgroup>
                        <col width="50%" />
                        <col width="100" />
                        <col width="270" />
                        <col width="200" />
                    </colgroup>
                    <tbody id="uploadQueue">
                    </tbody>
                </table>
            </div>
            <div class="upload_panel_btn clearfix">
                <a href="javascript:;" id="uploadSelectFile">选择文件</a><a href="javascript:;" id="uploadFiles">上传文件</a><a
                    href="javascript:;" id="clearUploadQueue">清空列表</a><a href="javascript:;" title="关闭"
                        class="panel_close">关闭</a>
            </div>
        </div>
        <div id="pageSetPanel" class="box_panel" style="height: 600px; display: none; background-color: #f3f3f3;">
            <div class="panel_title" style="">
                书本页面管理[可拖拽调整页面顺序,调整完记得保存设置]<a href="javascript:;" title="关闭" class="panel_close">X</a>
            </div>
            <div class="pageset_item" id="pageSetItem" style="height: 500px; overflow: auto;">
            </div>
            <div class="box_panel_btn clearfix">
                <div id="savePageSetNotice">
                </div>
                <a href="javascript:;" id="savePageSetBtn">保存设置</a><a href="javascript:;" class="panel_close">关闭</a>
            </div>
        </div>
        <div id="bookSetPanel" class="box_panel" style="@(model.DonePages == 0 ? "" : "display: none;") ">
            <div class="panel_title" style="">
                预设书本信息<a href="javascript:;" title="关闭" class="panel_close">X</a>
            </div>
            <form action="/editor/savebookset" method="post" id="BookSetForm">
            <div class="editor_label">
                书名</div>
            <div class="editor_field">
                <input type="hidden" id="BookID" name="BookID" value="@(model.ID)" />
                <input type="hidden" id="UserID" name="UserID" value="@(model.UserID)" />
                <input type="hidden" id="TotalCount" name="TotalCount" value="@(model.PageCount)" />
                <input type="text" maxlength="50" name="BookName" id="BookName" class="type_text" value="@(model.BookName)" />
            </div>
            <div class="editor_label">
                作者</div>
            <div class="editor_field">
                <input type="text" maxlength="50" name="BookAuthor" id="BookAuthor"  class="type_text" value="@(model.Author)"  />
            </div>
            <div class="editor_label">
                序言</div>
            <div class="editor_field">
                <textarea rows="10" cols="20" name="BookBrief" id="BookBrief">@(model.BookDesc)</textarea>
            </div>
            <div class="editor_label">
                印刷字体</div>
            <div class="editor_field" style="font-size: 24px; margin-top: 7px;">
                <input type="radio" @(model.BookFont<=1?"checked=\"checked\"":"")  name="BookPrintFont" id="BookPrintFont1" value="1" />
                <img src="../../Content/pagestyle/editor_img/font_1.png" alt="简洁字体" style="vertical-align: middle;" />&nbsp;
                <input type="radio" name="BookPrintFont" id="BookPrintFont2" value="2" @(model.BookFont==2?"checked=\"checked\"":"")  />
                <img src="../../Content/pagestyle/editor_img/font_2.png" alt="古典衬线字体" style="vertical-align: middle;" />&nbsp;
                <input type="radio" name="BookPrintFont" id="BookPrintFont3" value="3" @(model.BookFont==3?"checked=\"checked\"":"") />
                <img src="../../Content/pagestyle/editor_img/font_3.png" alt="亲切手写字体" style="vertical-align: middle;" />
            </div>
            </form>
            <div class="box_panel_btn clearfix">
                <div id="saveBookSetNotice">
                </div>
                <a href="javascript:;" id="saveBookSetBtn">保存设置</a><a href="javascript:;" class="panel_close">关闭</a>
            </div>
        </div>
        <div class="txteditor_tool" id="txtEditorTool" style="display: none;">
            <ul class="clearfix">
                <li class="txt_align active"><a href="javascript:;" id="txtAlignLeft" class="txt_align_left"
                    title="左对齐"></a></li>
                <li class="txt_align"><a href="javascript:;" id="txtAlignMid" class="txt_align_center"
                    title="居中"></a></li>
                <li class="txt_align"><a href="javascript:;" id="txtAlignRight" class="txt_align_right"
                    title="右对齐"></a></li>
                <li class="txt_color selected" style="margin-left: 20px;"><a href="javascript:;"
                    id="txtColorBlack" class="txt_color_black"></a></li>
                <li class="txt_color " style="margin-left: 7px;"><a href="javascript:;" id="txtColorWhite"
                    class="txt_color_white"></a></li>
                <li class="txt_count">还可以输入<span id="alreadyInputCount">20</span>/<span id="canInputCount">20</span>个字符</li>
            </ul>
        </div>
    </div>
    <div class="pageview_panel boxshadow" id="pageViewPanel">
        <div class="page_view">
            <ul class="page_view_list clearfix" id="pageViewList">
            </ul>
        </div>
        <ul class="pageview_menu">
            <li class="first_item"><a href="javascript:;" id="ShowBookSetPanelBtn">印品预设</a><span
                class="arrow_icon"></span></li>
            <li class="active"><a href="javascript:;">编辑</a><span class="arrow_icon"></span></li><li>
                <a href="javascript:;" id="ShowPageSetPanelBtn">页面管理</a><span class="arrow_icon"
                    style="z-index: 103"></span></li>
            <li><a href="javascript:;" id="switch2ViewBtn">印品预览</a><span class="arrow_icon"></span></li>
            <li><a href="">下单印制</a><span class="arrow_icon"></span></li>
            <li><a href="">在线客服</a><span class="arrow_icon"></span></li>
            <li style="float: right;"><a href="javascript:;" class="e_bg slide_r bind_slide"
                title="下一页"></a></li>
            <li style="float: right;"><a href="javascript:;" class="e_bg slide_l bind_slide"
                title="上一页"></a></li>
        </ul>
    </div>
</div>
<div class="mpview_panel intime" id="mpviewPanel" style="display: none; left: 0px;">
    <div class="mpview_con_wrapper">
        <div class="mpview_con">
            <ul class="clearfix" id="mpviewList">
            </ul>
            <div class="book_mid">
            </div>
        </div>
    </div>
    <div class="mpview_btn clearfix">
        <a href="javascript:;" id="nextPage">下一页</a> <a href="javascript:;" id="prevPage">上一页</a><a
            href="javascript:;" id="editPage">编辑当前页</a><a href="javascript:;" id="closePanel">关闭</a>
    </div>
</div>
